-
Notifications
You must be signed in to change notification settings - Fork 341
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
change DYNAMIC_THREAD_COUNT to be an AtomicUsize #451
change DYNAMIC_THREAD_COUNT to be an AtomicUsize #451
Conversation
src/task/task_id.rs
Outdated
|
||
impl TaskId { | ||
/// Generates a new `TaskId`. | ||
pub(crate) fn generate() -> TaskId { | ||
static COUNTER: AtomicU64 = AtomicU64::new(1); | ||
static COUNTER: AtomicUsize = AtomicUsize::new(1); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should still be an AtomicU64
, I'm afraid. What we can do is use AtomicCell<u64>
from crossbeam-utils
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have changed it as you suggest
#286 Is this PR ready to merge? Then I'll close this~It looks better |
@kolapapa it seems this PR has merge conflicts with master. Could this perhaps be rebased? Thanks! |
#141